package com.appspot.moviesessions.provider;

import android.content.ContentValues;

import com.appspot.moviesessions.ApplicationEvent;

public class DataFoundEvent extends ApplicationEvent {

	private static final DataFoundEvent MOVIE_FOUND_EVENT = new DataFoundEvent(
			Type.MOVIE);

	private static final DataFoundEvent LOCATION_FOUND_EVENT = new DataFoundEvent(
			Type.LOCATION);

	private static final DataFoundEvent SESSION_FOUND_EVENT = new DataFoundEvent(
			Type.SESSION);

	private Type type;

	private ContentValues values;

	public enum Type {
		MOVIE, LOCATION, SESSION
	}

	private DataFoundEvent(Type type) {
		this.type = type;
	}

	public static DataFoundEvent movieDataFoundEvent(ContentValues values) {
		MOVIE_FOUND_EVENT.values = values;
		return MOVIE_FOUND_EVENT;
	}

	public static DataFoundEvent locationDataFoundEvent(ContentValues values) {
		LOCATION_FOUND_EVENT.values = values;
		return LOCATION_FOUND_EVENT;
	}

	public static DataFoundEvent sessionDataFoundEvent(ContentValues values) {
		SESSION_FOUND_EVENT.values = values;
		return SESSION_FOUND_EVENT;
	}

	public Type getType() {
		return type;
	}

	public ContentValues getValues() {
		return values;
	}

}
